package com.cy.service;

import com.cy.bean.*;
import com.cy.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceIm implements UserService{
    @Autowired
    private UserMapper userMapper;


    @Override
    public User doLogin(String uopid) {
        return userMapper.doLogin(uopid);
    }

    @Override
    public List<Userbasicmessage> selectUser(int uid, String usex, int uage, String uprovince) {
        return userMapper.selectUser(uid,usex,uage,uprovince);
    }

    @Override
    public List<Userbasicmessage> followUser(int uid, String usex, int uage, String uprovince) {
        return userMapper.followUser(uid,usex,uage,uprovince);
    }


    @Override
    public Userbasicmessage selecUserba(int uid) {
        return userMapper.selecUserba(uid);
    }

    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }

    @Override
    public Userloverrequest selectUserLove(int uid) {
        return userMapper.selectUserLove(uid);
    }

    @Override
    public Userdetailmessage selectUserDetail(int uid) {
        return userMapper.selectUserDetail(uid);
    }

    @Override
    public int updateFollow(int uid, int friendid, int pid) {
        return userMapper.updateFollow(uid,friendid,pid);
    }

    @Override
    public int addDynamic(Dynamic dynamic) {
        return userMapper.addDynamic(dynamic);
    }

    @Override
    public List<Dynamic> selectDynamic() {
        return userMapper.selectDynamic();
    }

    @Override
    public int addcomment(Comment comment) {
        return userMapper.addcomment(comment);
    }

    @Override
    public List<Chat> selectChat(Chat chat) {
        return userMapper.selectChat(chat);
    }

    @Override
    public int sendmessage(Chat chat) {
        return userMapper.sendmessage(chat);
    }

    @Override
    public List<User> selectConcern(User user) {
        return userMapper.selectConcern(user);
    }




    //磊
    //插入基本资料
    @Override
    public int insertBasicMsg(Userbasicmessage userbasicmessage) {
        return userMapper.insertBasicMsg(userbasicmessage);
    }

    //插入详细资料
    @Override
    public int insertDetailMsg(Userdetailmessage userdetailmessage) {
        return userMapper.insertDetailMsg(userdetailmessage);
    }

    //插入择偶要求
    @Override
    public int insertLoverReq(Userloverrequest userloverrequest) {
        return userMapper.insertLoverReq(userloverrequest);
    }

    //查看基本资料
    @Override
    public Userbasicmessage selectBasicMsg(int uid) {
        return userMapper.selectBasicMsg(uid);
    }

    //查看详资料
    @Override
    public Userdetailmessage selectDetailMsg(int uid) {
        return userMapper.selectDetailMsg(uid);
    }


    //查看择偶要求
    @Override
    public Userloverrequest selectLoverReq(int uid) {
        return userMapper.selectLoverReq(uid);
    }

    //查看用户是否填过基本信息表
    @Override
    public Userbasicmessage checkBasicMsg(int uid) {
        return userMapper.checkBasicMsg(uid);
    }

    //查看用户是否填过详细信息表
    @Override
    public Userdetailmessage checkDetailMsg(int uid) {
        return userMapper.checkDetailMsg(uid);
    }

    //查看用户是否填过择偶要求表
    @Override
    public Userloverrequest checkLoverReq(int uid) {
        return userMapper.checkLoverReq(uid);
    }

    //修改基本信息表
    @Override
    public int uptBasicMsg(Userbasicmessage userbasicmessage) {
        return userMapper.uptBasicMsg(userbasicmessage);
    }

    //修改详细信息表
    @Override
    public int uptDetailMsg(Userdetailmessage userdetailmessage) {
        return userMapper.uptDetailMsg(userdetailmessage);
    }

    //修改基本择偶要求表
    @Override
    public int uptLoverReq(Userloverrequest userloverrequest) {
        return userMapper.uptLoverReq(userloverrequest);
    }

    //插入自我评价
    @Override
    public int insertEducate(Userhobby userhobby) {
        return userMapper.insertEducate(userhobby);
    }
    //修改自我评价
    @Override
    public int uptEducate(Userhobby userhobby) {
        return userMapper.uptEducate(userhobby);
    }
    //查看自我评价
    @Override
    public Userhobby selectEducate(int uid) {
        return userMapper.selectEducate(uid);
    }



    @Override
    public int updatePwd(User tbluser) {
        return userMapper.updatePwd(tbluser);
    }
}
